import React from 'react';
import { ConfigProvider, App as AntdApp } from 'antd';
import zhCN from 'antd/locale/zh_CN';
import { BrowserRouter } from 'react-router-dom';
import AppRoutes from './routes/index';
import './App.css';

const App: React.FC = () => (
  <ConfigProvider 
    locale={zhCN}
    theme={{
      token: {
        colorPrimary: '#007aff',
        borderRadius: 8,
        fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
      },
      components: {
        Button: {
          borderRadius: 9999,
        },
        Card: {
          borderRadius: 12,
        },
        Input: {
          borderRadius: 8,
        },
        Select: {
          borderRadius: 8,
        },
        Table: {
          borderRadius: 12,
        },
      },
    }}
  >
    <AntdApp>
      <BrowserRouter>
        <div className="app-container">
          <main className="main-content">
            <AppRoutes />
          </main>
        </div>
      </BrowserRouter>
    </AntdApp>
  </ConfigProvider>
);

export default App;

